home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Programmation
/
Alpha ƒ
/
Tcl
/
SystemCode
/
toolboxAssist.tcl
< prev
next >
Wrap
Text File
|
1995-03-07
|
2KB
|
78 lines
#================================================================================
# QuickView¬ Toolbox Assistant Help
#================================================================================
proc toolboxRefMenu {} {}
menu -m -n $toolboxRefMenu -p toolboxProc {
"Goto Reference"
"(-"
"Display Trap Template"
"Insert Trap Template"
"/L<O<ULookup Trap"
}
proc toolboxProc {menu item} {
switch $item {
"Goto Reference" { gotoTBReference }
"Display Trap Template" { displayTBTrapTemplate }
"Insert Trap Template" { insertTBTrapTemplate }
"Lookup Trap" { lookupTBTrap }
}
}
set lastTrap {}
proc insertTBTrapTemplate {} {
global lastTrap
if {![string length [checkRunning QuickView¬ ALTV tassPath]]} return
set text [getSelect]
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
} else {
deleteText [getPos] [selEnd]
}
set lastTrap $text
set res [AEBuild -r {'ALTV'} DanR {TMPL} "----" "╥$text╙"]
regexp {╥.*╙} $res one
insertText [string trim $one {╥╙}]
}
proc displayTBTrapTemplate {} {
global lastTrap
if {![string length [checkRunning QuickView¬ ALTV tassPath]]} return
set text {}
catch {set text [getSelect]}
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
}
set lastTrap $text
set res [AEBuild -r {'ALTV'} DanR {TMPL} "----" "╥$text╙"]
regexp {╥.*╙} $res one
alertnote [string trim $one {╥╙}]
}
proc lookupTBTrap {} {
global lastTrap
if {![string length [checkRunning QuickView¬ ALTV tassPath]]} return
set text {}
catch {set text [getSelect]}
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
}
set lastTrap $text
AEBuild {'ALTV'} DanR {REF } "----" "╥$text╙"
}
proc gotoTBReference {} {
catch {switchTo [checkRunning QuickView¬ ALTV tassPath]}
}